package com.huage_02;

public class PhoneDemo {
    public static void main(String[] args) {
        Phone p1 = new Phone();

        //访问成员变量
        System.out.println(p1.getBrand());
        System.out.println(p1.getPrice());

        //修改成员变量
        p1.setBrand( "小米");;
        p1.setPrice(-2999);
        System.out.println(p1.getBrand());
        System.out.println(p1.getPrice());
        System.out.println("-----------");

        Phone p = new Phone("小米");
        p.setPrice(2999);
        System.out.println(p.getBrand());
        System.out.println(p.getPrice());
        //访问成员方法
        p.call();
        p.sendMessage();
    }
}
